package com.kgc.cgprovider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.cgapi.service.CGXJServiceApi;
import com.kgc.cgprovider.service.CGXJService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class CGXJController implements CGXJServiceApi {

    @Resource
    private CGXJService cgxjService;


    @Override
    public ResponseMsg getCGXJ(String code) {
        ResponseMsg responseMsg = cgxjService.getCGXJPojo(code);
        return responseMsg;
    }


    @Override
    public ResponseMsg getCGXJPage(Map<String, Object> params) {
        ResponseMsg responseMsg = cgxjService.getPage(params);
        return responseMsg;
    }

    @Override
    public ResponseMsg addCGXJ(Map<String, Object> params) {
        ResponseMsg responseMsg = cgxjService.addCGXJ(params);
        return responseMsg;
    }

    @Override
    public ResponseMsg modiCGXJ(Map<String, Object> map) {
        ResponseMsg responseMsg = cgxjService.modiCGXJ(map);
        return responseMsg;
    }

    @Override
    public ResponseMsg inputCGXJ(Map<String, Object> map) {
        ResponseMsg responseMsg = cgxjService.importCGXJ(map);
        return responseMsg;
    }

}
